package db.freebase.entities;

public class FreeBaseEntityFactory {

    @SuppressWarnings("unchecked")
    public static<T extends FreeBaseEntity> T createInstance(Class<T> clazz) {
        if (clazz.equals(FreeBaseFictionalCharacter.class)) {
            return (T)new FreeBaseFictionalCharacter();
        } else if (clazz.equals(FreeBaseFictionalDateTime.class)) {
            return (T)new FreeBaseFictionalDateTime();
        } else if (clazz.equals(FreeBaseFictionalEmpolymentTenure.class)) {
            return (T)new FreeBaseFictionalEmpolymentTenure();
        } else if (clazz.equals(FreeBaseGenericMediator.class)) {
            return (T)new FreeBaseGenericMediator();
        } else {
            return null;
        }
    }
    
}
